[NET] back: Reset netfilter context in loopback receive path.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 29 Sep 2006 08:29:20 +0000 (09:29 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 29 Sep 2006 08:29:20 +0000 (09:29 +0100)
The issue is described in bugzilla report #746.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/drivers/xen/netback/loopback.c

index e1f34fe5b711b9d57b301b91aa7f34907bd9060d..53392a42a385f87adf6b5f62f253e4ef45bfdbac 100644 (file)
@@ -53,7 +53,8 @@
 #include <linux/skbuff.h>
 #include <linux/ethtool.h>
 #include <net/dst.h>
-#include <asm/hypervisor.h> /* is_initial_xendomain() */
+#include <net/xfrm.h>          /* secpath_reset() */
+#include <asm/hypervisor.h>    /* is_initial_xendomain() */
 
 static int nloopbacks = -1;
 module_param(nloopbacks, int, 0);
@@ -111,6 +112,11 @@ static int loopback_start_xmit(struct sk_buff *skb, struct net_device *dev)
        skb->protocol = eth_type_trans(skb, dev);
        skb->dev      = dev;
        dev->last_rx  = jiffies;
+
+       /* Flush netfilter context: rx'ed skbuffs not expected to have any. */
+       nf_reset(skb);
+       secpath_reset(skb);
+
        netif_rx(skb);
 
        return 0;